//
//  Guest.m
//  MobileAppsTipApp
//
//  Created by jcotter on 10/10/11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import "Guest.h"


@implementation Guest


-(NSString*)getName
{
    return m_name;
}
-(void)settName: (NSString*)name
{
    m_name = name;
}
-(double)getTipPerc
{
    return m_tipPerc;
}
-(void)setTipPerc: (double)tipPerc
{
    m_tipPerc = tipPerc;
}
-(double)getSubtotal
{
    return m_subtotal;
}
-(void)setSubtotal: (double)subTotal 
{
    m_subtotal = subTotal;
}
-(double)getTotal
{
    double total = m_subtotal + m_taxAmnt + [self getTipTotal];
        
    return total;
}
-(double)getTipTotal
{
    if(m_useTax)
    {
        return (m_subtotal + m_taxAmnt) * m_tipPerc;
    }
    else
    {
        return m_subtotal * m_tipPerc;
    }
}

-(void)setTaxAmount: (double)taxAmnt
{
    m_taxAmnt = taxAmnt;
}
-(double)getTaxAmount
{
    return m_taxAmnt;
}
-(void)setUseTaxInTip: (BOOL) useTax
{
    m_useTax = useTax;
}
-(BOOL)getUseTaxInTip
{
    return m_useTax;
}

@end
